package com.min.star.model;

import java.io.Serializable;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.Range;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

@TableName("sys_examination")
public class Examination extends BaseEntity implements Serializable{
	
    private static final long serialVersionUID=1L;
	
	@TableId(type = IdType.AUTO)
	private Long id;
	
	@TableField("stu_id")
	@NotNull(message = "{examination.stuId.required}")
	@DecimalMax(value = "9999999999",message = "{examination.stuId.minlength}")
	@DecimalMin(value = "1000000000",message = "{examination.stuId.minlength}")
	private Long stuId;
	
	@TableField(exist = false)
	private Student student;
	
	@TableField("tea_id")
    @NotNull(message="{examination.teaId.required}")
	@Range(max = 99999999,min = 10000000,message ="{examination.teaId.minlength}")
	private Long teaId;
	
	@TableField(exist = false)
	private Teacher teacher;
	
	@TableField("cur_id")
	@NotNull(message="{examination.curId.required}")
	@Range(max = 99999999,min = 10000000,message ="{examination.curId.minlength}")
	private Long curId;
	
	@TableField(exist = false)
	private Curriculum curriculum;
	
	@TableField("location")
	@NotBlank(message = "{examination.location.required}")
	private String location;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getStuId() {
		return stuId;
	}

	public void setStuId(Long stuId) {
		this.stuId = stuId;
	}

	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	public Long getTeaId() {
		return teaId;
	}

	public void setTeaId(Long teaId) {
		this.teaId = teaId;
	}

	public Teacher getTeacher() {
		return teacher;
	}

	public void setTeacher(Teacher teacher) {
		this.teacher = teacher;
	}

	public Long getCurId() {
		return curId;
	}

	public void setCurId(Long curId) {
		this.curId = curId;
	}

	public Curriculum getCurriculum() {
		return curriculum;
	}

	public void setCurriculum(Curriculum curriculum) {
		this.curriculum = curriculum;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

}
